package com.atguigu.jxc.controller;

import com.atguigu.jxc.domain.ServiceVO;
import com.atguigu.jxc.entity.DamageList;
import com.atguigu.jxc.service.DamageService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping
public class DamageController {

    @Autowired
    private DamageService damageService;
    @PostMapping("/damageListGoods/save")
    public ServiceVO saveDamageListGoods(DamageList damageList, String damageListGoodsStr){
       return damageService.saveDamageListGoods( damageList, damageListGoodsStr);
    }

    //查询报损单列表
    @PostMapping("/damageListGoods/list")
    public Map<String,Object> damageListGoods(String  sTime, String  eTime){
        return damageService.damageListGoods(sTime,eTime);
    }
    //查询报损单商品信息
    @PostMapping("/damageListGoods/goodsList")
    public Map<String,Object>  damageGoods(Integer damageListId){
        return damageService.damageGoods(damageListId);
    }


}
